package com.miyake.dsp.convolution;

import com.miyake.dsp.ComplexArray;
import com.miyake.dsp.Processor;

public class ConvolutionProxy implements Processor {
	private Processor convolution;
	
	public enum Engine {
		scilab, octave;
	}
	
	public ConvolutionProxy(ConvolutionSetting setting, Engine engine) {
		if (engine.equals(Engine.scilab)) {
			convolution = new ConvolutionImplScilab(setting);
		}
		else if (engine.equals(Engine.octave)) {
			convolution = new ConvolutionImplOctave(setting);
		}
	}
	@Override
	public void setSource(ComplexArray source) {
		convolution.setSource(source);
	}

	@Override
	public ComplexArray getSource() {
		return convolution.getSource();
	}

	@Override
	public ComplexArray getProcessed() {
		return convolution.getProcessed();
	}

	@Override
	public Object getSetting() {
		return convolution.getSetting();
	}

}
